-- GENERATED SPELL FOR [Infinite Chrono-Magus] --


function spell0_27898(pUnit, Event) --@Shadow Blast,n/a--
pUnit:FullCastSpellOnTarget(38085,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27898', 6000, 1)
end

function spell1_27898(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27898', 3000, 1)
end

function Sorts_27898(pUnit, Event)
local choix_sorts_27898 = math.random(0, 1)
if choix_sorts_27898 == 0 then
pUnit:RegisterEvent('spell0_27898', 1, 1)
end
if choix_sorts_27898 == 1 then
pUnit:RegisterEvent('spell1_27898', 1, 1)
end
end

function mob27898_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27898', math.random(1500, 3000), 1)
end

function mob27898_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27898_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27898_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27898, 1, 'mob27898_Action')
RegisterUnitEvent(27898, 2, 'mob27898_Leave')
RegisterUnitEvent(27898, 3, 'mob27898_Kill')
RegisterUnitEvent(27898, 4, 'mob27898_Die')
